setwd("E:/5hmc_file/2_5hmc_yjp_bam/ASM/20201120")
file=read.csv("more.than.2AShM.in.DC.csv",head=T)
file=file[,-2]

bf=read.table("at.leat.one.AShM.DC6v6_bf.txt",head=T,sep="\t")
bf=data.frame(unitID=bf$unitID,BF_in_DC=bf$Bayes_in_DC)
con.beta0=read.table("DC.con.beta0.txt",head=T,sep="\t")
case.beta0=read.table("DC.case.beta0.txt",head=T,sep="\t")

file=merge(file,bf,by="unitID")
file=merge(file,con.beta0,by="unitID")
file=merge(file,case.beta0,by="unitID")

file$beta.sig.DC="FALSE"
file[file$DC.con.FDR<0.1|file$DC.case.FDR<0.1,]$beta.sig.DC="TRUE"
write.csv(file,"more.than.2AShM.in.DC.add.BayesFactor.beta.DC.csv",quote=F,row.names = F)
